﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Decoration.Models.Models
{
    /// <summary>
    /// 产品
    /// </summary>
    public class ProductInfo
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        /// <summary>
        /// 产品图片
        /// </summary>
        [MaxLength(100)]
        public string? ProductPict { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [MaxLength(50)]
        public string ProductName { get; set; } = null!;

        /// <summary>
        /// 产品价格
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal ProductPrice { get; set; }


        public DateTime CreateTime { get; set; } = DateTime.Now;

        public int Status { get; set; } = 1;
    }
}
